<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>

    var person ={
        name : 'zhangsan',
        age : 23,
        eat:function () {
            alert('吃饭')
        }
    };

    document.write(person.name);
    document.write(person.age);
    person.eat();

</script>
</body>
</html>